package net.ibizsys.central.cloud.core.spring.configuration;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Component("ServiceHubSetting")
@ConfigurationProperties(NacosServiceHubSetting.PREFIX)
public class NacosServiceHubSetting extends NacosServiceHubSettingBase {

	@Value("${ibiz.runtime.config.enableBootServiceHub:false}")
	private boolean enableBootServiceHub;

	private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(NacosServiceHubSetting.class);

	@PostConstruct
	public void postConstruct() {
		if(!enableBootServiceHub)
			loadConfig();
	}
	
}
